﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;
using Core.Base;
using System.Data;

namespace MainApp.Modules.ICStatistics
{
    public class ICStatisticsModule: BaseModule
    {
        public ICStatisticsModule()
        {
            this.Name = "ICStatistics";
            entity = new ICStatisticsEntity();
            Init();
        }

        public void XemThongTinTonKho(int iStockID, int iProductCatID)
        {
            DataSet ds = AppContext.InvStockCtrl.GetObjects(iStockID, 0);
            ((ICStatisticsEntity)entity).lstInvStocks.GridView.DataSource = ds.Tables[0];
            //((ICStatisticsEntity)entity).lstInvStocks.Invalidate(ds);

            ((ICStatisticsEntity)entity).lstInvStocks.GridView.Refresh();
        }

        public void XemNXT(int iStockID, int iProductCatID, DateTime dtFrom , DateTime dtTo)
        {
            DataSet ds = AppContext.InvStockCtrl.GetObjects(iStockID, 0);
            ((ICStatisticsEntity)entity).lstInvStocks.GridView.DataSource = ds.Tables[0];
            //((ICStatisticsEntity)entity).lstInvStocks.Invalidate(ds);

            ((ICStatisticsEntity)entity).lstInvStocks.GridView.Refresh();
        }
       
    }
}
